/*
 * Copyright (c) 2016. For Intelligent Group.
 */

package com.intelligent.ispc.core.repository;


import com.intelligent.ispc.core.entity.GrrItem;
import com.intelligent.ispc.core.repository.mybatis.MyBatisRepository;

import java.util.List;


/**
 * Created by Julia on 2016/7/14.
 */

@MyBatisRepository
public interface GrrItemDao {

    /**
     * Create GRR item.
     *
     * @param grrItem details.
     */
    void createGrrItem(GrrItem grrItem);

    /**
     * Update GRR item.
     *
     * @param grrItem details.
     */
    void updateGrrItem(GrrItem grrItem);

    /**
     * Delete GRR item by id.
     *
     * @param id item id.
     */
    void deleteGrrItem(Long id);

    /**
     * Delete GRR item by name.
     *
     * @param name item name.
     */
    void deleteGrrItemByName(String name);

    /**
     * Delete GRR item by names.
     *
     * @param names item names.
     */
    void deleteGrrItemByNames(List<String> names);

    /**
     * Find GRR item by id.
     *
     * @param id item id.
     * @return GrrItem
     */
    GrrItem findById(Long id);

    /**
     * Find GRR item by name.
     *
     * @param name item name.
     * @return GrrItem
     */
    GrrItem findByGrrName(String name);
}
